<h1 class="page-header">标签</h1>

<div>
    <a href="?action=add" class="btn btn-primary">添加新标签</a>
</div>

<table class="table table-striped">
    <thead>
    <tr>
        <th>ID</th>
        <th>名称</th>
        <th>文章总数</th>
        <th>操作</th>
    </tr>
    </thead>
    <?php foreach ($tags as $tag): ?>
        <tr>
            <td><?php echo $tag['id']; ?></td>
            <td><?php e($tag['name']); ?></td>
            <td><?php e($tag['item_count']); ?></td>
            <td>
                <a href="?action=edit&id=<?php echo $tag['id']; ?>"><span class="glyphicon glyphicon-edit"></span>编辑</a>
                <a href="?action=delete&id=<?php echo $tag['id']; ?>" data-confirm="确定删除?" class="cmd-post"><span class="glyphicon glyphicon-remove"></span>删除</a>
            </td>
        </tr>
    <?php endforeach; ?>
</table>